package cn.school.workflow.service;

import cn.school.classManage.vo.SchoolClassVO;
import cn.school.student.entity.StudentInfo;
import cn.school.workflow.vo.ViolativeApplyVO;
import cn.school.workflow.vo.ViolativeApplysVO;
import cn.school.workflow.vo.WorkFlowVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface ViolativeApplyService extends IService<ViolativeApplyVO> {

    /**
     * 分页查询公文申请单
     * @param vo
     * @return
     */
    IPage<ViolativeApplyVO> findViolativeApplyPageList(ViolativeApplyVO vo);

    /**
     * 查询违纪报表
     */
    PageInfo getList(ViolativeApplysVO vo);

    /**
     * 取消申请
     * @param vo
     * @return
     */
    boolean cancelViolativeApply(WorkFlowVO vo);

    /**
     * 创建公文申请
     * @param vo
     * @return
     */
    int createViolativeApply(ViolativeApplyVO vo);

    /**
     * 根据ID查询公文申请详情
     * @param id
     * @return
     */
    ViolativeApplyVO findViolativeApplyDetail(Long id);

    /**
     * 学工处长违纪处理通知
     * @param vo
     * @return
     */
    int violativeProcess (ViolativeApplyVO vo);

    /**
     * 查询全部有效的班级
     * @return
     */
    List<SchoolClassVO> findClassAll ();

    /**
     * 根据班级查询学生
     * @param classId
     * @return
     */
    List<StudentInfo> findStudentByClassId(String classId);

    /**
     * 分组统计 状态：2、3，最近7天的数据（不含当天日期的数据）
     *
     * @author fangjin.tao
     * @updateTime 2022/12/12 10:41
     * @return: java.util.Map<java.lang.String, java.util.List < java.lang.Object>>
     */
    Map<String, List<Object>> violativeApplyLastSenvenDayList();
}
